package com.glorious.gcontacts.spring.repositories;

import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManager;
import javax.jdo.PersistenceManagerFactory;

import org.springframework.stereotype.Repository;

@Repository
public class PersistenceRepository
{
	private PersistenceManagerFactory persistenceManagerFactory;
	
	public PersistenceRepository()
	{
		persistenceManagerFactory = JDOHelper.getPersistenceManagerFactory("transactions-optional");
	}
	
	public PersistenceManager getManager()
	{
		return persistenceManagerFactory.getPersistenceManager();
	}
}
